.class public Les/u7;
.super Ljava/lang/Object;
.source "BackgroundDrawer.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/u7$b;
    }
.end annotation


# static fields
.field private static final g:[F

.field private static h:Ljava/nio/FloatBuffer;

.field private static final i:[F

.field private static final j:Ljava/nio/FloatBuffer;


# instance fields
.field private a:Les/t7;

.field private b:Les/v8;

.field private c:[F

.field private d:[F

.field private e:Lcom/esfile/screen/recorder/media/util/y;

.field private final f:Les/u7$b;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/16 v0, 0xc

    new-array v0, v0, [F

    .line 1
    fill-array-data v0, :array_0

    sput-object v0, Les/u7;->g:[F

    .line 2
    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a([F)Ljava/nio/FloatBuffer;

    move-result-object v0

    sput-object v0, Les/u7;->h:Ljava/nio/FloatBuffer;

    const/16 v0, 0x8

    new-array v0, v0, [F

    .line 3
    fill-array-data v0, :array_1

    sput-object v0, Les/u7;->i:[F

    .line 4
    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a([F)Ljava/nio/FloatBuffer;

    move-result-object v0

    sput-object v0, Les/u7;->j:Ljava/nio/FloatBuffer;

    return-void

    nop

    :array_0
    .array-data 4
        -0x40800000    # -1.0f
        -0x40800000    # -1.0f
        0x0
        0x3f800000    # 1.0f
        -0x40800000    # -1.0f
        0x0
        -0x40800000    # -1.0f
        0x3f800000    # 1.0f
        0x0
        0x3f800000    # 1.0f
        0x3f800000    # 1.0f
        0x0
    .end array-data

    :array_1
    .array-data 4
        0x0
        0x3f800000    # 1.0f
        0x3f800000    # 1.0f
        0x3f800000    # 1.0f
        0x0
        0x0
        0x3f800000    # 1.0f
        0x0
    .end array-data
.end method

.method public constructor <init>(Les/t7;)V
    .locals 3

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/16 v0, 0x10

    new-array v1, v0, [F

    .line 2
    iput-object v1, p0, Les/u7;->c:[F

    new-array v0, v0, [F

    .line 3
    iput-object v0, p0, Les/u7;->d:[F

    .line 4
    new-instance v0, Lcom/esfile/screen/recorder/media/util/y;

    const/4 v1, 0x0

    invoke-direct {v0, v1, v1}, Lcom/esfile/screen/recorder/media/util/y;-><init>(II)V

    iput-object v0, p0, Les/u7;->e:Lcom/esfile/screen/recorder/media/util/y;

    .line 5
    new-instance v0, Les/u7$b;

    const/4 v2, 0x0

    invoke-direct {v0, p0, v2}, Les/u7$b;-><init>(Les/u7;Les/u7$a;)V

    iput-object v0, p0, Les/u7;->f:Les/u7$b;

    .line 6
    new-instance v0, Les/w8;

    invoke-direct {v0}, Les/w8;-><init>()V

    iput-object v0, p0, Les/u7;->b:Les/v8;

    .line 7
    iput-object p1, p0, Les/u7;->a:Les/t7;

    .line 8
    iget-object p1, p0, Les/u7;->c:[F

    invoke-static {p1, v1}, Landroid/opengl/Matrix;->setIdentityM([FI)V

    .line 9
    iget-object p1, p0, Les/u7;->d:[F

    invoke-static {p1, v1}, Landroid/opengl/Matrix;->setIdentityM([FI)V

    return-void
.end method

.method private a(JLes/s7;Les/v7;)V
    .locals 0

    .line 29
    invoke-virtual {p4, p1, p2}, Les/v7;->a(J)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 30
    invoke-virtual {p4}, Les/v7;->d()V

    goto :goto_0

    .line 31
    :cond_0
    iget-object p1, p0, Les/u7;->f:Les/u7$b;

    invoke-virtual {p1, p3, p4}, Les/u7$b;->a(Les/s7;Les/v7;)V

    :goto_0
    return-void
.end method

.method private a(Les/v8;)V
    .locals 1
    .param p1    # Les/v8;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 7
    iget-object v0, p0, Les/u7;->b:Les/v8;

    invoke-interface {v0}, Les/v8;->destroy()V

    .line 8
    invoke-interface {p1}, Les/v8;->init()V

    .line 9
    iput-object p1, p0, Les/u7;->b:Les/v8;

    return-void
.end method


# virtual methods
.method public a(J)I
    .locals 18

    move-object/from16 v0, p0

    move-wide/from16 v14, p1

    .line 10
    iget-object v1, v0, Les/u7;->a:Les/t7;

    invoke-virtual {v1, v14, v15}, Les/t7;->a(J)Les/s7;

    move-result-object v12

    if-eqz v12, :cond_5

    .line 11
    iget-boolean v1, v12, Les/s7;->a:Z

    if-eqz v1, :cond_0

    const/4 v1, -0x1

    return v1

    .line 12
    :cond_0
    iget-object v1, v0, Les/u7;->b:Les/v8;

    instance-of v1, v1, Les/w8;

    if-nez v1, :cond_1

    .line 13
    new-instance v1, Les/w8;

    invoke-direct {v1}, Les/w8;-><init>()V

    invoke-direct {v0, v1}, Les/u7;->a(Les/v8;)V

    .line 14
    :cond_1
    iget-object v1, v0, Les/u7;->f:Les/u7$b;

    invoke-virtual {v1, v12}, Les/u7$b;->a(Les/s7;)Les/v7;

    move-result-object v13

    const/4 v1, -0x3

    const-string v2, "bgd"

    if-nez v13, :cond_2

    const-string v3, "No BackgroundTarget found"

    .line 15
    invoke-static {v2, v3}, Lcom/esfile/screen/recorder/media/util/k;->a(Ljava/lang/String;Ljava/lang/String;)V

    return v1

    .line 16
    :cond_2
    iget-object v3, v0, Les/u7;->e:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v13, v3}, Les/v7;->a(Lcom/esfile/screen/recorder/media/util/y;)Z

    move-result v3

    if-nez v3, :cond_3

    const-string v3, "Background elgSetup failed"

    .line 17
    invoke-static {v2, v3}, Lcom/esfile/screen/recorder/media/util/k;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 18
    invoke-direct {v0, v14, v15, v12, v13}, Les/u7;->a(JLes/s7;Les/v7;)V

    return v1

    .line 19
    :cond_3
    invoke-virtual {v13}, Les/v7;->e()I

    move-result v3

    if-gtz v3, :cond_4

    const-string v3, "Texture id <= 0"

    .line 20
    invoke-static {v2, v3}, Lcom/esfile/screen/recorder/media/util/k;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 21
    invoke-direct {v0, v14, v15, v12, v13}, Les/u7;->a(JLes/s7;Les/v7;)V

    return v1

    :cond_4
    const/16 v16, 0xbe2

    .line 22
    invoke-static/range {v16 .. v16}, Landroid/opengl/GLES20;->glEnable(I)V

    const/16 v1, 0x302

    const/16 v2, 0x303

    .line 23
    invoke-static {v1, v2}, Landroid/opengl/GLES20;->glBlendFunc(II)V

    .line 24
    iget-object v1, v0, Les/u7;->b:Les/v8;

    invoke-virtual {v13}, Les/v7;->e()I

    move-result v2

    sget-object v3, Les/u7;->h:Ljava/nio/FloatBuffer;

    const/16 v4, 0xc

    const/4 v5, 0x3

    const/4 v6, 0x4

    sget-object v7, Les/u7;->j:Ljava/nio/FloatBuffer;

    const/16 v8, 0x8

    iget-object v9, v0, Les/u7;->c:[F

    iget-object v10, v0, Les/u7;->d:[F

    const/4 v11, 0x0

    move-object/from16 v17, v12

    move-object v0, v13

    move-wide/from16 v12, p1

    invoke-interface/range {v1 .. v13}, Les/v8;->a(ILjava/nio/FloatBuffer;IIILjava/nio/FloatBuffer;I[F[FLjava/nio/ShortBuffer;J)V

    .line 25
    invoke-static/range {v16 .. v16}, Landroid/opengl/GLES20;->glDisable(I)V

    move-object/from16 v1, p0

    move-object/from16 v2, v17

    .line 26
    invoke-direct {v1, v14, v15, v2, v0}, Les/u7;->a(JLes/s7;Les/v7;)V

    const/4 v0, 0x0

    return v0

    :cond_5
    move-object v1, v0

    const/4 v0, -0x2

    return v0
.end method

.method public a()V
    .locals 1

    .line 27
    iget-object v0, p0, Les/u7;->b:Les/v8;

    invoke-interface {v0}, Les/v8;->destroy()V

    .line 28
    iget-object v0, p0, Les/u7;->f:Les/u7$b;

    invoke-virtual {v0}, Les/u7$b;->a()V

    return-void
.end method

.method public a(II)V
    .locals 3

    if-lez p1, :cond_0

    if-lez p2, :cond_0

    .line 1
    invoke-virtual {p0}, Les/u7;->a()V

    .line 2
    iget-object v0, p0, Les/u7;->e:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v0, p1}, Lcom/esfile/screen/recorder/media/util/y;->b(I)V

    .line 3
    iget-object p1, p0, Les/u7;->e:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {p1, p2}, Lcom/esfile/screen/recorder/media/util/y;->a(I)V

    .line 4
    iget-object p1, p0, Les/u7;->b:Les/v8;

    invoke-interface {p1}, Les/v8;->init()V

    return-void

    .line 5
    :cond_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "width "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " <= 0 || height "

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " <= 0"

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public a(Z)V
    .locals 1

    .line 6
    sget-object v0, Les/u7;->j:Ljava/nio/FloatBuffer;

    invoke-static {v0, p1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/nio/FloatBuffer;Z)V

    return-void
.end method
